package com.xiaozhengkeji.springboot.frame.easy.utils;

import wiki.xsx.core.handler.*;
import wiki.xsx.core.util.RedisUtil;

public class XZRedisUtil {
    private int BaseHandler = 0;

    public XZRedisUtil(int baseHandler) {
        this.BaseHandler = baseHandler;
    }

    /*数字(Number)*/
    public NumberHandler getNumber() {
        return RedisUtil.getNumberHandler(this.BaseHandler);
    }

    /*字符串(String)*/
    public StringHandler getString() {
        return RedisUtil.getStringHandler(this.BaseHandler);
    }

    /*哈希(Hash)*/
    public HashHandler getHash() {
        return RedisUtil.getHashHandler(this.BaseHandler);
    }

    /*无序集合(Set)*/
    public SetHandler getSet() {
        return RedisUtil.getSetHandler(this.BaseHandler);
    }

    /*有序集合(Zset)*/
    public ZsetHandler getZset() {
        return RedisUtil.getZsetHandler(this.BaseHandler);
    }

    /*基数(HyperLogLog)*/
    public HyperLogLogHandler getHyperLogLog() {
        return RedisUtil.getHyperLogLogHandler(this.BaseHandler);
    }

    /*位图(Bitmap)*/
    public BitmapHandler getBitmap() {
        return RedisUtil.getBitmapHandler(this.BaseHandler);
    }

    /*地理位置(Geo)*/
    public GeoHandler getGeo() {
        return RedisUtil.getGeoHandler(this.BaseHandler);
    }

    /*键(Key)*/
    public KeyHandler getKey() {
        return RedisUtil.getKeyHandler(this.BaseHandler);
    }

    /*脚本(Lua Script)*/
    public ScriptHandler getScript() {
        return RedisUtil.getScriptHandler(this.BaseHandler);
    }

    /*发布订阅(Pubsub)*/
    public PubSubHandler getPubSub() {
        return RedisUtil.getPubSubHandler(this.BaseHandler);
    }

    /*流(Stream)*/
    public StreamHandler getStream() {
        return RedisUtil.getStreamHandler(this.BaseHandler);
    }

    /*数据库(DB)*/
    public DBHandler getDB() {
        return RedisUtil.getDBHandler(this.BaseHandler);
    }

    /*哨兵(Sentinel)*/
    public SentinelHandler getSentinel() {
        return RedisUtil.getSentinelHandler(this.BaseHandler);
    }

    /*集群(Cluster)*/
    public ClusterHandler getCluster() {
        return RedisUtil.getClusterHandler();
    }

    /*自定义命令(CustomCommand)*/
    public CustomCommandHandler getCustomCommand() {
        return RedisUtil.getCustomCommandHandler(this.BaseHandler);
    }

    /*分布式锁(Lock)*/
    public RedisLockHandler getRedisLock() {
        return RedisUtil.getRedisLockHandler(this.BaseHandler);
    }

    /*事务(Transaction)*/
    public TransactionHandler getTransaction() {
        return RedisUtil.getTransactionHandler(this.BaseHandler);
    }

}
